<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>网站</title>

    <% include "./layout/head.html" ignore missing %>
</head>

<body ontouchstart>
    <div id="app">

        <% include "./layout/header.html" ignore missing %>


        <div class="m-web" style="padding-bottom: 60px;">
            <!-- header -->
            <div class="weui-tab" style="height:44px;">
                <div class="weui-navbar">
                    <div class="weui-navbar__item" :class="{'tab-green': tabs === 1}" @click="tabs = 1">
                        网站
                    </div>
                    <div class="weui-navbar__item" :class="{'tab-green': tabs === 2}" @click="tabs = 2">
                        源
                    </div>
                </div>
            </div>
            <!-- body -->
            <div class="web-body">
                <!-- one -->
                <div class="web-body-one" v-show="tabs === 1">
                    <!-- list -->
                    <div class="weui-panel" v-for="item in list">
                        <div class="weui-panel__hd">{{item.web_name}}</div>
                        <div class="weui-panel__bd">
                            <div class="weui-media-box weui-media-box_text">
                                <h4 class="weui-media-box__title">{{item.web_url}}</h4>
                                <!-- <p class="weui-media-box__desc">由各种物质组成的巨型球状天体，叫做星球。星球有一定的形状，有自己的运行轨道。</p> -->
                                <ul class="weui-media-box__info">
                                    <li class="weui-media-box__info__meta">{{item.web_user}}</li>
                                    <li class="weui-media-box__info__meta">{{item.web_pwd}}</li>
                                    <!-- <li class="weui-media-box__info__meta weui-media-box__info__meta_extra">其它信息</li> -->
                                </ul>
                            </div>
                        </div>
                    </div>
                    <!-- 添加 -->
                    <div class="weui-btn-area">
                        <a class="weui-btn weui-btn_primary open-popup" data-target="#full" @click="openAdd">添加</a>
                    </div>  
                    <!--  添加弹窗 -->
                    <div id="full" class="weui-popup__container m-modal-win" :class="{'weui-popup__container--visible': openModal}" :style="{'z-index': 1000, 'display': openModal ? 'block' : 'none', 'opacity': 1}">
                        <div class="weui-popup__overlay"></div>
                        <div class="weui-popup__modal">
                            <div class="win-body">
                                <div class="weui-cells weui-cells_form">
                                    <div class="weui-cell">
                                        <div class="weui-cell__hd"><label class="weui-label">网站名称</label></div>
                                        <div class="weui-cell__bd">
                                            <input class="weui-input" v-model="login.web_name" placeholder="" type="text">
                                        </div>
                                    </div>
                                    <div class="weui-cell">
                                        <div class="weui-cell__hd"><label class="weui-label">网站地址</label></div>
                                        <div class="weui-cell__bd">
                                            <input class="weui-input" v-model="login.web_url" placeholder="" type="text">
                                        </div>
                                    </div>
                                    <div class="weui-cell">
                                        <div class="weui-cell__hd"><label class="weui-label">网站用户名</label></div>
                                        <div class="weui-cell__bd">
                                            <input class="weui-input" v-model="login.web_user" placeholder="" type="text">
                                        </div>
                                    </div>
                                    <div class="weui-cell">
                                        <div class="weui-cell__hd"><label class="weui-label">网站密码</label></div>
                                        <div class="weui-cell__bd">
                                            <input class="weui-input" v-model="login.web_pwd" placeholder="" type="text">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <a href="javascript:;" class="weui-btn weui-btn_primary" @click="add">保存</a>
                            <a href="javascript:;" class="weui-btn weui-btn_primary close-popup">关闭</a>
                        </div>
                    </div>
                    <!--  /添加弹窗 -->
                </div>
                <!-- /one -->

                <!-- one -->
                <div class="web-body-one" v-show="tabs === 2">
                    <!-- list -->
                    <div class="weui-panel" v-for="item in list2">
                        <div class="weui-panel__hd" @click="openMdSource(item)">{{item.source_name}}</div>
                    </div>
                    <!-- 添加 -->
                    <div class="weui-btn-area">
                        <a class="weui-btn weui-btn_primary open-popup" data-target="#full2" @click="openAdd2">添加</a>
                    </div>  
                    <!--  添加弹窗 -->
                    <div id="full2" class="weui-popup__container m-modal-win" :class="{'weui-popup__container--visible': openModal2}" :style="{'z-index': 1000, 'display': openModal2 ? 'block' : 'none', 'opacity': 1}">
                        <div class="weui-popup__overlay"></div>
                        <div class="weui-popup__modal">
                            <div class="win-body">
                                <div class="weui-cells weui-cells_form">
                                    <div class="weui-cell">
                                        <div class="weui-cell__hd"><label class="weui-label">源网站名称</label></div>
                                        <div class="weui-cell__bd">
                                            <input class="weui-input" v-model="oLogin.source_name" placeholder="" type="text">
                                        </div>
                                    </div>
                                    <div class="weui-cell">
                                        <div class="weui-cell__hd"><label class="weui-label">源地址</label></div>
                                        <div class="weui-cell__bd">
                                            <textarea class="weui-textarea" v-model="oLogin.source_aurl" placeholder="一行一条" rows="5"></textarea>
                                        </div>
                                    </div>

                                    <div class="weui-cell">
                                        <div class="weui-cell__hd"><label class="weui-label">列表区域正则</label></div>
                                        <div class="weui-cell__bd">
                                            <textarea class="weui-textarea" v-model="oLogin.source_matchlist" placeholder="列表区域正则" rows="3"></textarea>
                                        </div>
                                    </div>

                                    <div class="weui-cell">
                                        <div class="weui-cell__hd"><label class="weui-label">列表链接正则</label></div>
                                        <div class="weui-cell__bd">
                                            <textarea class="weui-textarea" v-model="oLogin.source_matchurl" placeholder="链接正则" rows="3"></textarea>
                                        </div>
                                    </div>

                                    <div class="weui-cell">
                                        <div class="weui-cell__hd"><label class="weui-label">标题正则</label></div>
                                        <div class="weui-cell__bd">
                                            <textarea class="weui-textarea" v-model="oLogin.source_matchtitle" placeholder="标题正则" rows="3"></textarea>
                                        </div>
                                    </div>

                                    <div class="weui-cell">
                                        <div class="weui-cell__hd"><label class="weui-label">内容正则</label></div>
                                        <div class="weui-cell__bd">
                                            <textarea class="weui-textarea" v-model="oLogin.source_matchbody" placeholder="内容正则" rows="3"></textarea>
                                        </div>
                                    </div>

                                </div>
                            </div>
                            <a href="javascript:;" class="weui-btn weui-btn_primary" @click="test">测试</a>
                            <a href="javascript:;" class="weui-btn weui-btn_primary" @click="addSource">保存</a>
                            <a href="javascript:;" class="weui-btn weui-btn_primary" @click="openModal2 = false">关闭</a>
                        </div>
                    </div>
                    <!--  /添加弹窗 -->
                </div>
                <!-- /one -->
            </div>
        </div>


        <!-- footer -->
        <% include "./layout/footer.html" ignore missing %>
        <!-- /footer -->

    </div>

    <script src="/static/js/web.js"></script>

</body>
</html>